package com.zbkj.crmeb.chant.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 商户限时活动表
 * </p>
 *
 * @author wuzp
 * @since 2022-05-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("eb_channel_activity")
@ApiModel(value="ChannelActivity对象", description="商户限时活动表")
public class ChannelActivity extends Model<ChannelActivity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "活动id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商户id")
    private Integer merId;

    @ApiModelProperty(value = "活动名称")
    private String name;

    @ApiModelProperty(value = "banner图最多9张")
    private String image;

    @ApiModelProperty(value = "活动标识")
    private String mark;

    @ApiModelProperty(value = "适用人群（1 所有 2 无订单用户 3 新用户,4会员用户）")
    private Integer crowd;

    @ApiModelProperty(value = "限购数量（0不限量）")
    private Integer limitTotal;

    @ApiModelProperty(value = "超出限购（0无法购买 1售价购买）")
    private Integer limited;

    @ApiModelProperty(value = "是否预热（1立即预热  2选择预热  3不预热）")
    private Integer preheating;

    @ApiModelProperty(value = "预热开始时间")
    private Date preheatingStartTime;

    @ApiModelProperty(value = "预热结束时间")
    private Date preheatingEndTime;

    @ApiModelProperty(value = "预热期间是否购买(0不可购买  1按照售价购买  )")
    private Integer preheatingBuy;

    @ApiModelProperty(value = "活动开始时间")
    private Date startTime;

    @ApiModelProperty(value = "活动结束时间")
    private Date endTime;

    @ApiModelProperty(value = "活动说明")
    private String description;

    @ApiModelProperty(value = "活动结束商品状态（0恢复售价  1自动下架）")
    private Integer productStatus;

    @ApiModelProperty(value = "是否已执行自动下架任务")
    private Integer isTask;

    @ApiModelProperty(value = "是否删除")
    private Integer isDel;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "商品id集合")
    @TableField(exist = false)
    private List<Integer> ids;

    @ApiModelProperty(value = "商品id")
    @TableField(exist = false)
    private Integer productId;

    @ApiModelProperty(value = "商品属性skuid")
    @TableField(exist = false)
    private String sourceSkuId;

    @ApiModelProperty(value = "商品活动最低价")
    @TableField(exist = false)
    private BigDecimal minPrice;

    @ApiModelProperty(value = "商品活动价")
    @TableField(exist = false)
    private BigDecimal spikePrice;

    @ApiModelProperty(value = "能否购买(0不可购买  1按照售价购买 2秒杀价购买 )")
    @TableField(exist = false)
    private Integer canBuy;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
